<template>
  <div style="width: 100%">
    <el-table :data="tableData" stripe style="width: 100%">
      <el-table-column label="日期" width="200">
        <template slot-scope="scope">
          <span>{{ $utils.formatDateTime(scope.row.addtime)}}</span>
        </template>
      </el-table-column>
      <el-table-column prop="op" label="操作人员" width="150"></el-table-column>
      <el-table-column label="支出" width="100">
        <template slot-scope="scope">
          <span>{{ scope.row.pay==0?'-':'-'+scope.row.pay}}</span>
        </template>
      </el-table-column>
      <el-table-column label="收入" width="100">
        <template slot-scope="scope">
          <span>{{ scope.row.income==0?'-':'+'+scope.row.income}}</span>
        </template>
      </el-table-column>
      <el-table-column label="余额" width="100">
        <template slot-scope="scope">
          <span>￥{{ scope.row.balance}}</span>
        </template>
      </el-table-column>
      <el-table-column prop="info1" label="操作信息"></el-table-column>
    </el-table>
  </div>
</template>
<script>
export default {
  name: "igfrmblog",
  data() {
    return {
      tableData: []
    };
  },
  props: {
    username: {
      type: String,
      default: ""
    }
  },
  methods: {},
  watch: {},
  created() {
    this.$http
      .post("/home/rmblog", {
        softcode: "-1",
        type: "-1",
        level: "-1",
        pageNum: 1,
        pageSize: 10,
        username: this.username
      })
      .then(res => {
        this.isLoaded = true;
        this.tableData = res.list.slice(0, 9);
      })
      .catch(err => {
        this.$message.error(err);
      });
  }
};
</script>

<style scoped>
</style>
